//
//  TagsHeaderView.m
//  PigMarket
//
//  Created by Felix on 2019/3/26.
//  Copyright © 2019 felix.pigmarket.oc. All rights reserved.
//

#import "TagsHeaderView.h"

@interface TagsHeaderView ()

@end

@implementation TagsHeaderView

#pragma mark - init method
- (instancetype)init
{
    self = [super init];
    if (self) {
        [self initView];
        [self initLayout];
    }
    return self;
}
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
//        [self initView];
//        [self initLayout];
    }
    return self;
}
- (void)initView {
    // 添加子控件
    [self addSubview:self.contentView];
}

- (void)initLayout {
    // 布局子控件
    [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.centerY.mas_equalTo(0);
//        make.right.bottom.mas_equalTo(-20);
    }];
}

#pragma mark - getter and setter
- (void)setContentView:(UIView *)contentView {
    _contentView = contentView;
    [self initView];
    [self initLayout];
}

@end
